<script>
import { useRoute, useRouter } from 'vue-router'

export default {
  setup() {
    const router = useRouter()
    const route = useRoute()
    const redirect = route.query.redirect || '/'
    onMounted(() => {
      router.replace(redirect)
    })
    return () =>
      h('div', {
        style: {
          display: 'none',
        },
      })
  },
}
</script>
